1. Technical Field
The present invention relates generally to the field of data processing systems, and more specifically to a method and system for automatically configuring IDE bus devices appropriately as master or slave devices regardless of the devices' location on an IDE cable.
2. Description of Related Art
As described in the ATA specification, an IDE device has three possible configuration settings: master, slave, or cable select. A jumper is provided on each device that is used to select the appropriate configuration setting for that device. Thus, either master, slave, or cable select may be selected for each device using the device's jumper.
The various IDE devices are coupled together utilizing a cable that also adheres to the ATA specification. The IDE cable has three connectors. The connector attached to the controller, or host, is at one end. The connectors at the opposite end and in the middle of the cable are attached to the master and slave devices. In the case where a device has been configured in the cable select mode by the jumper, the device will sense the CSEL signal on the IDE bus and will configure itself to either master or slave according to the device's position on the cable. As described in the ATA specification, a device which determines that its CSEL pin is at a logical zero will configure itself as a master, and a device which determines that its CSEL pin is at a logical one will configure itself as a slave. A device configured as a cable select device that is attached to the connector at the end of the cable will become the slave device, while a device configured as a cable select device that is attached to the connector in the middle of the cable will become the master device.
In the case where a device has been configured by the jumper to be either a master or a slave device, the location of the device on the IDE bus has no impact on the device's mode. Thus, if a device that has been configured by the jumper to be a master device is coupled to the end connector, the device will operate as a master device. Similarly, if a device has been configured by the jumper to be a slave device and that device is coupled to the middle connector, the device will operate as a slave device.
FIG. 4 illustrates a cable 400 that conforms to the ATA specification for IDE cables in accordance with the prior art. The ATA specification defines a number of different pins and their functions, as well as a host connector 402, a middle connector 404, and an end connector 406. Host connector 402 is used to couple cable 400 to an IDE host controller, such as host 510, see FIG. 5B. An IDE device, such as device 500, see FIG. 5A, that is configured as a cable select device and that is coupled to middle connector 404 will operate in master mode. Any IDE device that is configured as a cable select device and that is coupled to end connector 406 will operate in slave mode.
Three wires of cable 400 are depicted in FIG. 4. The ATA specification defines several ground wires, such as ground 408 and 410. The specification also defines a CSEL wire depicted as 412. According to the specification, the CSEL pin 414 in middle connector 404 will be grounded through 412 when connector 402 is coupled to host 510. The CSEL pin 416 on end connector 406 is open.
FIG. 5A depicts internal connections within an IDE device 500 of selected pins in accordance with the prior art. Pins 502 and 506 are grounded within device 500. The CSEL wire is received within device 500 at pin 504 which is coupled to a voltage source, which is 5 Volts according to the ATA specification, through a resistor. In this manner, when device 500 is coupled to middle connector 404, pin 502 is coupled to wire 408, and pin 506 is coupled to wire 410. Pin 504 is coupled to pin 414 which causes pin 504 to be pulled to ground, and thus device 500 will act as a master device because pin 504 is at a logical zero. When device 500 is coupled to end connector 406, pin 504 will be at 5 Volts , and thus device 500 will act as a slave device because pin 504 is at a logical one.
As depicted by FIG. 5B, when host 510 is coupled to host connector 402, pin 512 is coupled to ground wire 408, pin 514, is coupled to ground wire 410, and CSEL pin 516 is coupled to CSEL wire 412.
In the prior art, if the devices are not jumpered for CSEL mode, it would be possible to have either two master devices or two slave devices existing on a single cable, resulting in errors. Furthermore, in CSEL mode it is possible to have a slave device present without a master device attached. This is typically not recommended. Therefore, a need exists for a method and system for automatically configuring IDE bus devices appropriately as master or slave devices regardless of the devices' location on an IDE cable.